package com.hhkj.admin.train.controller;

import com.hhkj.admin.train.domain.Train;
import com.hhkj.admin.train.model.req.TrainReq;
import com.hhkj.admin.train.model.res.TrainRes;
import com.hhkj.admin.train.service.biz.TrainBizService;
import com.ruoyi.common.annotation.LogTitlePrefix;
import com.ruoyi.common.annotation.PermissionPrefix;
import com.ruoyi.common.base.biz.controller.BaseController;
import com.ruoyi.common.config.WebAddressConfig;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 培训练习Controller
 *
 * @author ruoyi
 * @since 2023-05-24
 */
@LogTitlePrefix("培训练习")
@PermissionPrefix("api:train")
@RestController
@RequestMapping("/train")
public class TrainController extends BaseController<Train, TrainReq, TrainRes, TrainBizService>
{

    /** 查看培训答题页地址 */
    @GetMapping("/view/address")
    public AjaxResult getViewAddress()
    {
        return AjaxResult.successData(WebAddressConfig.getTrainViewAddress());
    }

    /** 查看培训信息地址 */
    @GetMapping("/address")
    public AjaxResult getAddress()
    {
        return AjaxResult.successData(WebAddressConfig.getTrainAddress());
    }
}
